<script lang="ts" setup>
const content = ref('')

const dialogVisible = ref(false)
</script>

<template>
  <el-card class="m-base">
    <template #header> 富文本编辑器 </template>

    <WangEditor v-model:value="content" height="400px" />

    <el-button type="primary" @click="dialogVisible = true"> 内容预览 </el-button>

    <el-dialog v-model="dialogVisible" title="富文本内容预览" width="1000px" top="50px">
      <div class="view" v-html="content"></div>
    </el-dialog>
  </el-card>
</template>
